﻿<phone:PhoneApplicationPage x:Class="nyxwin.Main.View.MainPage"
                            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                            xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
                            xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
                            xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
                            xmlns:imagetools="clr-namespace:ImageTools.Controls;assembly=ImageTools.Controls"
                            xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                            xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" d:DesignWidth="480"
                            d:DesignHeight="696" FontFamily="{StaticResource PhoneFontFamilyNormal}"
                            FontSize="{StaticResource PhoneFontSizeNormal}" Foreground="{StaticResource PhoneForegroundBrush}"
                            SupportedOrientations="PortraitOrLandscape" Orientation="Portrait" shell:SystemTray.IsVisible="True">

    <phone:PhoneApplicationPage.Resources>
        <imagetools:ImageConverter x:Key="imageConverter" />
    </phone:PhoneApplicationPage.Resources>

    <Grid x:Name="LayoutRoot" Background="Transparent">
        <controls:Pivot x:Name="pivot" Title="{Binding Path=Localization.Resource.AppTitle}" SelectionChanged="PivotSelectionChanged">
            <!--<controls:PivotItem x:Name="piMail" Header="mail">
                <ListBox x:Name="listBoxMail">
                    <ListBox.ItemTemplate>
                        <DataTemplate>
                            <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" Margin="4">
                                <imagetools:AnimatedImage Source="{Binding NickImageUrl, Converter={StaticResource imageConverter}}" Width="56" Height="56" />
                                <TextBlock Text="{Binding Direction}" />
                                <StackPanel Orientation="Vertical">
                                    <TextBlock Text="{Binding Nick}" Style="{StaticResource PhoneTextAccentStyle}" />
                                    <TextBlock Text="{Binding DisplayTime}" Style="{StaticResource PhoneTextSubtleStyle}" />
                                    <TextBlock Text="{Binding Content}" TextWrapping="Wrap" MaxWidth="256" />
                                </StackPanel>
                            </StackPanel>
                        </DataTemplate>
                    </ListBox.ItemTemplate>
                </ListBox>
            </controls:PivotItem>

            <controls:PivotItem x:Name="piActiveFriends" Header="friends">
                <ListBox x:Name="listBoxFriends">
                    <ListBox.ItemTemplate>
                        <DataTemplate>
                            <StackPanel Orientation="Horizontal" Margin="4">
                                <imagetools:AnimatedImage Source="{Binding NickImageUrl, Converter={StaticResource imageConverter}}" Width="56" Height="56" />
                                <StackPanel Orientation="Vertical">
                                    <TextBlock Text="{Binding Nick}" Style="{StaticResource PhoneTextAccentStyle}" />
                                    <TextBlock Text="{Binding LastActivityFormat}" Style="{StaticResource PhoneTextSubtleStyle}" />
                                    <TextBlock Text="{Binding Location}" TextWrapping="Wrap" Style="{StaticResource PhoneTextNormalStyle}" />
                                </StackPanel>
                            </StackPanel>
                        </DataTemplate>
                    </ListBox.ItemTemplate>
                </ListBox>
            </controls:PivotItem>
            
            <controls:PivotItem x:Name="piBookmarks" Header="bookmarks">
                <ListBox x:Name="listBoxBookmarks">
                    <ListBox.ItemTemplate>
                        <DataTemplate>
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="64" />
                                    <ColumnDefinition />
                                </Grid.ColumnDefinitions>
                                <TextBlock Grid.Column="0" Text="{Binding Unread}" Style="{StaticResource PhoneTextAccentStyle}" />
                                <TextBlock Grid.Column="1" Text="{Binding Title}" Style="{StaticResource PhoneTextNormalStyle}" />
                            </Grid>
                        </DataTemplate>
                    </ListBox.ItemTemplate>
                </ListBox>
            </controls:PivotItem>-->
        </controls:Pivot>
    </Grid>

    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem Text="settings" />
                <shell:ApplicationBarMenuItem Text="about" />
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>
</phone:PhoneApplicationPage>